package com.example.demo.controller;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.PUserService;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/testboot")
@RestController
@EnableAutoConfiguration
public class TestBootController {

    @Autowired
    PUserService userService;

    @RequestMapping("getuser")
    public User getUser(){
        User user=new User();
        user.setName("hgcajj");
        userService.updateDb();
        return user;
    }
}
